package com.clstu.homeworks.homework07;

public class Student extends Person{
    private String id;

    public Student(String name, int age, String sex, String id) {
        super(name, age, sex);
        this.id = id;
    }

    public  void study(){
        System.out.println("我是学生，我承诺，我会好好学习");
    }

    @Override
    public String play() {
        return getName()+"爱玩足球";
    }

    @Override
    public void printInfo() {
        System.out.println("学生信息：");
        super.printInfo();
        System.out.println("ID:     "+id);
    }
}
